package bancosys.tec.security.authorization;

/**
 * Permissao que representa um grupo
 * 
 * @author takeshi
 */
public class GroupPermission extends AbstractPermission {

    /**
     * C'tor
     * 
     * @param id o id da permissao
     */
    public GroupPermission(String id) {
        if (id == null) {
            throw new NullPointerException();
        }
        this.id = id;
        this.type = GroupPermission.class;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    protected boolean matchPermissionId(String permissionId) {
        return permissionId != null & this.id.toUpperCase().equals(permissionId.toUpperCase());
    }

}
